<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const person = {
        name: "jack",
        say() {
          console.log("hello");
        },
      };
      const u1 = {
        __proto__: person,
      };
      u1.name = "lucy"; //和原型无关
      console.log(u1.name); // lucy

      console.log("person", person);
      console.log("u1", u1);
    </script>
  </body>
</html>
